<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo09-3种传参示例介绍</title>
    <script src="../plugins/vue/vue.min.js"></script>
    <script src="../plugins/vue/axios.min.js"></script>

</head>
<body>
    <div id="app">
        <input v-model="param"> <button @click="sendByPath">路径传参示例</button>
        <br/>
        <input v-model="p1" placeholder="参数1"><input v-model="p2" placeholder="参数2">
        <input v-model="p3" placeholder="参数3"><button @click="sendByNormalParam">普通参数传参</button>




    </div>


</body>
<script>
    new Vue({
        el:"#app",
        data:{
            param:"",
            p1:"",
            p2:"",
            p3:""

        },
        methods:{
            sendByPath(){
                axios.get("/getParamByPath/"+this.param).then(res=>{
                    alert(res.data);
                })
            },

            sendByNormalParam(){
                axios.get("/getNormalParam?p1="+this.p1+"&p2="+this.p2+"&p3="+this.p3).then(res=>{
                    alert(res.data);
                })
            }

        }


    })



</script>
</html>